package com.aquila.bible;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.widget.Toast;

import com.umeng.analytics.MobclickAgent;
import com.umeng.update.UmengUpdateAgent;
import com.umeng.update.UmengUpdateListener;
import com.umeng.update.UpdateResponse;

public class MyBaseActivity extends Activity {
	
	public Context context ;
	public LayoutInflater layoutInflater ;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		context = this ;
		layoutInflater = getLayoutInflater() ;
		MobclickAgent.onError(this) ;
		MobclickAgent.updateOnlineConfig(this) ;
		
	}
	
	@Override
	public void onResume() {
	    super.onResume();
	    MobclickAgent.onResume(this);
	}
	
	@Override
	public void onPause() {
	    super.onPause();
	    MobclickAgent.onPause(this);
	}
	
	/**
	 * 显示toast的提示
	 * @param text
	 * @param isLong
	 *2012-7-20 下午4:51:43
	 */
	public void showToast(String text, boolean isLong){
		if (isLong) {
			Toast.makeText(context, text, Toast.LENGTH_LONG).show() ;
		}
		else {
			Toast.makeText(context, text, Toast.LENGTH_SHORT).show() ;
		}
	}
	
}
